﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="UserPermision.ascx.cs"
    Inherits="NCS.Module.CMS.Admin.UserPermision" %>
<%@ Register Assembly="NCS.Library" Namespace="NCS.Library.Controls"
    TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:UpdatePanel ID="upanelUserPermision" runat="server" UpdateMode="Conditional" RenderMode="Inline">
    <triggers>
        <asp:AsyncPostBackTrigger ControlID="cmdUpdate" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="cmdCancel" EventName="Click" />
         <asp:AsyncPostBackTrigger ControlID="dtgUsers" EventName="RowCommand" />
         <asp:AsyncPostBackTrigger ControlID="dropPortal" EventName="SelectedIndexChanged" />
    </triggers>
    <contenttemplate>
		<table cellspacing="0" cellpadding="0" width="100%" border="0">
			<tbody>
				<tr>
					<td valign="top" width="60%">
						<cc1:GridView ID="dtgUsers" OnRowCommand="dtgUsers_RowCommand" Width="100%" PageSize="15"
							CssClass="Grid" CellPadding="2" BorderWidth="1px" BorderStyle="Solid" BorderColor="Gainsboro"
							AutoGenerateColumns="False" AllowPaging="True" runat="server" OnPageIndexChanging="dtgUsers_PageIndexChanging">
							<AlternatingRowStyle CssClass="Grid_Raw2" />
							<RowStyle CssClass="Grid_Raw1" />
							<HeaderStyle CssClass="Grid_Top" Font-Bold="True" />
							<Columns>
								<asp:BoundField DataField="UserID" HeaderText="ID" Visible="False"></asp:BoundField>
								<asp:BoundField DataField="Username" HeaderText="T&#224;i khoản">
									<headerstyle width="30%"></headerstyle>
								</asp:BoundField>
								<asp:BoundField DataField="Email" HeaderText="Email"></asp:BoundField>
								 <asp:BoundField DataField="RoleDescription" HeaderText="Nh&#243;m" SortExpression="RoleDescription" />
								<asp:TemplateField HeaderText="Thao tác">
									<itemtemplate>
							<asp:Button ID="btnZonePermision" runat="server" CommandArgument='<%# Eval("UserID") %>'								CommandName="roles" CssClass="Button" Text="Phân quyền" Width="85px" />
						</itemtemplate>
								</asp:TemplateField>
							</Columns>
						</cc1:GridView>
						
					</td>
					<td width="5">
					</td>
					<td class="InputBox" valign="top">
						<table cellspacing="0" cellpadding="0" width="100%" border="0">
							<tbody>								
								<tr>
									<td>
										Tài khoản : &nbsp;<asp:Label ID="lblUsername" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label>
										<asp:TextBox ID="txtUserID" Width="39px" runat="server" Visible="False" Enabled="False"></asp:TextBox></td>
								</tr>
								<tr>
									<td height="5">
									</td>
								</tr>
								<tr>
									<td>
										<asp:RadioButtonList ID="rdoPermisions" Width="100%" CssClass="Button" runat="server"
											RepeatDirection="Horizontal">
											<asp:ListItem Value="2">Quản l&#253;</asp:ListItem>
											<asp:ListItem Value="1">Xuất bản tin</asp:ListItem>
											<asp:ListItem Value="0">Bi&#234;n tập</asp:ListItem>
										</asp:RadioButtonList></td>
								</tr>
								<tr>
									<td height="5">
									</td>
								</tr>							
								<tr>
									<td>
                                        <strong>
										Cổng :</strong>
                                        <asp:DropDownList ID="dropPortal" runat="server" AutoPostBack="True" CssClass="dropDefault" DataTextField="Portal_Name" DataValueField="PortalID" OnSelectedIndexChanged="dropPortal_SelectedIndexChanged">
                                        </asp:DropDownList></td>
								</tr>
								<tr>
									<td height="5">
									</td>
								</tr>
								<tr>
									<td>
                                        <strong>
										Quyền chuyên mục</strong></td>
								</tr>
								<tr>
									<td height="5">
									</td>
								</tr>
								<tr>
									<td>
										<asp:ListBox ID="lstZones" Width="100%" runat="server" SelectionMode="Multiple" Rows="15">
										</asp:ListBox></td>
								</tr>
								<tr>
									<td>
										<asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label></td>
								</tr>
								<tr>
									<td align="middle" style="height: 24px">
										<asp:Button ID="cmdUpdate" OnClick="cmdUpdate_Click" Width="88px" CssClass="Button"
											runat="server" Text="Cập nhật"></asp:Button>
										<asp:Button ID="cmdCancel" OnClick="cmdCancel_Click" Width="88px" CssClass="Button"
											runat="server" Text="Hủy"></asp:Button>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>

</contenttemplate>
</asp:UpdatePanel>